package org.example.skytool.security;


import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
import org.springframework.stereotype.Component;
import org.springframework.util.StopWatch;

@Component
@Slf4j
public class ThreadLocalUtil {

    private ThreadLocal<String> threadLocals = new ThreadLocal<>();


    public void setUser(String id){
        threadLocals.set(id);
    }

    public String getId(){
        return threadLocals.get();
    }

    public void clear(){
        threadLocals.remove();
    }


}
